UNIFACE CommUNIque

Four UNIFACE Triggers with Implicit Default Behavior

This tip was submitted by Kevin Bondonno. Kevin is a supervisor in Technical Support at Compuware. He can be reached by e-mail at: kevin_bondonno@compuware.com

The triggers on this 'cheat sheet' are fully documented, and I have also provided the references below. Uniface Technical Support has received a number of questions regarding these triggers and their behavior.

EXECUTE (EXEC)

An empty EXEC trigger contains an implicit EDIT command. The implicit EDIT command invokes the structure editor. The structure editor is what executes the form in a user-interactive mode. Without the EDIT statement, the form will run in a non-interactive, or batch, mode. The default behavior will be overridden if any Proc code is placed in the trigger. If there is any Proc code placed in the EXEC trigger, then the EDIT command needs to be explicitly coded for the structure editor to be invoked.

References:

v5.2 Proc Language Reference Manual, Pg. 3-51

v6.1 Proc Language Reference Manual, Pg. 5-57

ADD/INSERT OCCURRENCE (AIO)

An empty AIO trigger contains an implicit CREOCC command. The implicit CREOCC command creates a blank occurrence. This behavior will be overridden if any Proc code is placed in the trigger. If there is any Proc code placed in the AIO trigger, then the CREOCC command needs to be explicitly coded for a blank occurrence to be created.

References:

v5.2 Proc Language Reference Manual, Pg. 3-15

v6.1 Proc Language Reference Manual, Pg. 5-17

PRINT (PRNT)

An empty PRNT trigger contains an implicit PRINT command. The implicit PRINT command will bring up the standard Uniface print form. This behavior will be overridden if any Proc code is placed in the trigger without the PRINT command.

References:

v5.2 Proc Language Reference Manual, Pg. 3-105

v6.1 Proc Language Reference Manual, Pg. 5-125

REMOVE OCCURRENCE (RMO)

Whether the RMO trigger contains Proc code or not, this trigger contains an implicit REMOCC command. When this trigger is activated (regardless of the Proc code) the occurrence will be marked for removal by the implicit REMOCC command. The method for overriding this behavior is to return a value of -1 from this trigger. If the Proc code in this trigger returns a value of -1, the occurrence will not be removed.

References:

v5.2 Proc Language Reference Manual, Pg. 3-117, 118

v6.1 Proc Language Reference Manual, Pg. 5-137, 138


Copyright 1996 Compuware Corporation. All Rights Reserved. Questions or comments about this site, E-mail us at www@compuware.com.